<template>
    <div>
        <div class="head">
            <img src="@/assets/logo.png" alt="">
            <ul>
                <li>常见问题</li>
                <li>安全中心</li>
                <li>客服</li>
                <li @click="$router.push({ path: '/login' })">{{ info }}</li>
                <li @click="exit">退出</li>
            </ul>
        </div>
    </div>
</template>

<script>
export default {
    computed: {
        info() {
            return this.$store.state.user_name ? this.$store.state.user_name : "登录"
        }
    },

    methods: {


        // 退出
        exit() {
            localStorage.clear();
            sessionStorage.clear();
            window.open("about:blank", "_self");
            window.close();
        }
    }
}
</script>

<style lang="scss" scoped>
div {
    .head {
        display: flex;
        justify-content: space-between;

        img {
            height: 100%;
            width: 60px;
        }

        ul {
            width: 300px;
            display: flex;
            justify-content: space-around;
            align-items: center;
        }
    }
}
</style>